#ifndef BUSINESSCACERUPDATE_H
#define BUSINESSCACERUPDATE_H

#include "common_opr_all.h"

using namespace std;


//从云端拉取配置文件
class BusinessCaCerUpdate
{
public:

    BusinessCaCerUpdate();
    ~BusinessCaCerUpdate();
    static BusinessCaCerUpdate &getInstance();
    void init();

private:

    CommonOprHttp comoprhttp;
    string cloudResCatchBuff;                // 云端请求响应缓存buff

int getSdaCaCerOnce();
int checkHttpHealth();
int getCaCerDownLoadLink();
int doDownLoadCaCerTask();
int updateLocalCaCer(string &caCerBuff);
int caCerBuffParse(string &caCerBuff, vector<string> &v_caCer);
int caCerBuffCreate(string &caCerBuff, vector<string> &v_caCer);

};


#endif // BUSINESSCACERUPDATE_H
